package org.jeecg.mapper;


import org.apache.ibatis.annotations.*;
import org.jeecg.domain.User;

@Mapper
public interface UserMapper {


    @Select("select * from sys_user where username = #{username}")
    User selectUser(String username);

//    @Insert("insert into sys_user(userNo,username,CardID,phone,password)  values (#{user.userNo},#{user.username},#{user.CardID},#{user.phone},#{user.password})")
//    int insertUser(@Param("user") User user);


    @Select("select * from sys_user where username = #{username}")
    User getUser(String username);

    @Update("update sys_user set password = #{password} where username = #{username}")
    Integer updateUserPassword(@Param("username") String username,@Param("password") String password);

    @Update("update sys_user set nickname = #{nickname},photo = #{photo},sign = #{sign},address = #{address} where username = #{username}")
    Integer updateUserInfor(User user);


}
